<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: pcl::visualization::PointCloudColorHandlerHSVField&lt; PointT &gt; 模板类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="#pro-attribs">Protected 属性</a> &#124;
<a href="#pri-types">Private 类型</a> &#124;
<a href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">pcl::visualization::PointCloudColorHandlerHSVField&lt; PointT &gt; 模板类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>HSV handler class for colors. Uses the data present in the "h", "s", "v" fields as the color at each point.  
 <a href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="point__cloud__color__handlers_8h_source.html">point_cloud_color_handlers.h</a>&gt;</code></p>
<div class="dynheader">
类 pcl::visualization::PointCloudColorHandlerHSVField&lt; PointT &gt; 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.png" usemap="#pcl::visualization::PointCloudColorHandlerHSVField_3C_20PointT_20_3E_map" alt=""/>
  <map id="pcl::visualization::PointCloudColorHandlerHSVField_3C_20PointT_20_3E_map" name="pcl::visualization::PointCloudColorHandlerHSVField_3C_20PointT_20_3E_map">
<area href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html" title="Base Handler class for PointCloud colors." alt="pcl::visualization::PointCloudColorHandler&lt; PointT &gt;" shape="rect" coords="0,0,360,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a28a698d4403adf08d1a0a9760a1e8d7a"><td class="memItemLeft" align="right" valign="top"><a id="a28a698d4403adf08d1a0a9760a1e8d7a"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html">PointCloudColorHandlerHSVField</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:a28a698d4403adf08d1a0a9760a1e8d7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6baf8491ef1ebd267ea4b9f821181b22"><td class="memItemLeft" align="right" valign="top"><a id="a6baf8491ef1ebd267ea4b9f821181b22"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html">PointCloudColorHandlerHSVField</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:a6baf8491ef1ebd267ea4b9f821181b22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler')"><img src="closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html">pcl::visualization::PointCloudColorHandler&lt; PointT &gt;</a></td></tr>
<tr class="memitem:a9b2953acc70faa002bd19c830851c0dd inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a9b2953acc70faa002bd19c830851c0dd"></a>
typedef <a class="el" href="classpcl_1_1_point_cloud.html">pcl::PointCloud</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloud</b></td></tr>
<tr class="separator:a9b2953acc70faa002bd19c830851c0dd inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a838a75697200f0b6b4f3cfcf5e26183b inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a838a75697200f0b6b4f3cfcf5e26183b"></a>
typedef PointCloud::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudPtr</b></td></tr>
<tr class="separator:a838a75697200f0b6b4f3cfcf5e26183b inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82321bb6bdd3b438c7259821f8f4d2e9 inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a82321bb6bdd3b438c7259821f8f4d2e9"></a>
typedef PointCloud::ConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudConstPtr</b></td></tr>
<tr class="separator:a82321bb6bdd3b438c7259821f8f4d2e9 inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2cba8b2c3d084b4f307581169c450d9 inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="ac2cba8b2c3d084b4f307581169c450d9"></a>
typedef boost::shared_ptr&lt; <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html">PointCloudColorHandler</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>Ptr</b></td></tr>
<tr class="separator:ac2cba8b2c3d084b4f307581169c450d9 inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ca5905f3cdba82ae8730362902e613f inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a0ca5905f3cdba82ae8730362902e613f"></a>
typedef boost::shared_ptr&lt; const <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html">PointCloudColorHandler</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>ConstPtr</b></td></tr>
<tr class="separator:a0ca5905f3cdba82ae8730362902e613f inherit pub_types_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a0583c75b45d6d39ac7e6c603fe21f89c"><td class="memItemLeft" align="right" valign="top"><a id="a0583c75b45d6d39ac7e6c603fe21f89c"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#a0583c75b45d6d39ac7e6c603fe21f89c">PointCloudColorHandlerHSVField</a> (const PointCloudConstPtr &amp;cloud)</td></tr>
<tr class="memdesc:a0583c75b45d6d39ac7e6c603fe21f89c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a0583c75b45d6d39ac7e6c603fe21f89c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a321690e53c586f2643bc6326f3bd98"><td class="memItemLeft" align="right" valign="top"><a id="a5a321690e53c586f2643bc6326f3bd98"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#a5a321690e53c586f2643bc6326f3bd98">~PointCloudColorHandlerHSVField</a> ()</td></tr>
<tr class="memdesc:a5a321690e53c586f2643bc6326f3bd98"><td class="mdescLeft">&#160;</td><td class="mdescRight">Empty destructor <br /></td></tr>
<tr class="separator:a5a321690e53c586f2643bc6326f3bd98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fd07a4c64c4a9dd4f591809ffde242d"><td class="memItemLeft" align="right" valign="top"><a id="a3fd07a4c64c4a9dd4f591809ffde242d"></a>
virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#a3fd07a4c64c4a9dd4f591809ffde242d">getFieldName</a> () const</td></tr>
<tr class="memdesc:a3fd07a4c64c4a9dd4f591809ffde242d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the name of the field used. <br /></td></tr>
<tr class="separator:a3fd07a4c64c4a9dd4f591809ffde242d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ff3f3e72f3a6d35c1a77a55946b823b"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#a6ff3f3e72f3a6d35c1a77a55946b823b">getColor</a> (<a class="el" href="classvtk_smart_pointer.html">vtkSmartPointer</a>&lt; vtkDataArray &gt; &amp;scalars) const</td></tr>
<tr class="memdesc:a6ff3f3e72f3a6d35c1a77a55946b823b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Obtain the actual color for the input dataset as vtk scalars.  <a href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#a6ff3f3e72f3a6d35c1a77a55946b823b">更多...</a><br /></td></tr>
<tr class="separator:a6ff3f3e72f3a6d35c1a77a55946b823b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler')"><img src="closed.png" alt="-"/>&#160;Public 成员函数 继承自 <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html">pcl::visualization::PointCloudColorHandler&lt; PointT &gt;</a></td></tr>
<tr class="memitem:a18678dfd183c2efb1bfaf73fcf457452 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a18678dfd183c2efb1bfaf73fcf457452"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a18678dfd183c2efb1bfaf73fcf457452">PointCloudColorHandler</a> ()</td></tr>
<tr class="memdesc:a18678dfd183c2efb1bfaf73fcf457452 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:a18678dfd183c2efb1bfaf73fcf457452 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada127fd3421f281d15531488bbbc3f0e inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="ada127fd3421f281d15531488bbbc3f0e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#ada127fd3421f281d15531488bbbc3f0e">PointCloudColorHandler</a> (const PointCloudConstPtr &amp;cloud)</td></tr>
<tr class="memdesc:ada127fd3421f281d15531488bbbc3f0e inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <br /></td></tr>
<tr class="separator:ada127fd3421f281d15531488bbbc3f0e inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6390912de56cda106a17b9ed619fd94a inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a6390912de56cda106a17b9ed619fd94a"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a6390912de56cda106a17b9ed619fd94a">~PointCloudColorHandler</a> ()</td></tr>
<tr class="memdesc:a6390912de56cda106a17b9ed619fd94a inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:a6390912de56cda106a17b9ed619fd94a inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78d414ffb3e0c6c269cac031c1cba218 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a78d414ffb3e0c6c269cac031c1cba218"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a78d414ffb3e0c6c269cac031c1cba218">isCapable</a> () const</td></tr>
<tr class="memdesc:a78d414ffb3e0c6c269cac031c1cba218 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if this handler is capable of handling the input data or not. <br /></td></tr>
<tr class="separator:a78d414ffb3e0c6c269cac031c1cba218 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a853e39570f293fdc6a683d57d4791632 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a853e39570f293fdc6a683d57d4791632">setInputCloud</a> (const PointCloudConstPtr &amp;cloud)</td></tr>
<tr class="memdesc:a853e39570f293fdc6a683d57d4791632 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the input cloud to be used.  <a href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a853e39570f293fdc6a683d57d4791632">更多...</a><br /></td></tr>
<tr class="separator:a853e39570f293fdc6a683d57d4791632 inherit pub_methods_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a1dc800ee56949801c4c58a9364c012be"><td class="memItemLeft" align="right" valign="top"><a id="a1dc800ee56949801c4c58a9364c012be"></a>
virtual std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#a1dc800ee56949801c4c58a9364c012be">getName</a> () const</td></tr>
<tr class="memdesc:a1dc800ee56949801c4c58a9364c012be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Class getName method. <br /></td></tr>
<tr class="separator:a1dc800ee56949801c4c58a9364c012be"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected 属性</h2></td></tr>
<tr class="memitem:afe19da10e3058540eb97b752f185810a"><td class="memItemLeft" align="right" valign="top"><a id="afe19da10e3058540eb97b752f185810a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#afe19da10e3058540eb97b752f185810a">s_field_idx_</a></td></tr>
<tr class="memdesc:afe19da10e3058540eb97b752f185810a"><td class="mdescLeft">&#160;</td><td class="mdescRight">The field index for "S". <br /></td></tr>
<tr class="separator:afe19da10e3058540eb97b752f185810a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae341450d12b8eb418b6ef9088dfb45e3"><td class="memItemLeft" align="right" valign="top"><a id="ae341450d12b8eb418b6ef9088dfb45e3"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html#ae341450d12b8eb418b6ef9088dfb45e3">v_field_idx_</a></td></tr>
<tr class="memdesc:ae341450d12b8eb418b6ef9088dfb45e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">The field index for "V". <br /></td></tr>
<tr class="separator:ae341450d12b8eb418b6ef9088dfb45e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler')"><img src="closed.png" alt="-"/>&#160;Protected 属性 继承自 <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html">pcl::visualization::PointCloudColorHandler&lt; PointT &gt;</a></td></tr>
<tr class="memitem:a792e2bb434adab01260cc3bfc5fd633f inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a792e2bb434adab01260cc3bfc5fd633f"></a>
PointCloudConstPtr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a></td></tr>
<tr class="memdesc:a792e2bb434adab01260cc3bfc5fd633f inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">A pointer to the input dataset. <br /></td></tr>
<tr class="separator:a792e2bb434adab01260cc3bfc5fd633f inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a667ee20514feb3d83ea205d39a2efe5f inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="a667ee20514feb3d83ea205d39a2efe5f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a667ee20514feb3d83ea205d39a2efe5f">capable_</a></td></tr>
<tr class="memdesc:a667ee20514feb3d83ea205d39a2efe5f inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">True if this handler is capable of handling the input data, false otherwise. <br /></td></tr>
<tr class="separator:a667ee20514feb3d83ea205d39a2efe5f inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af802304b20568b48ea9da0f203128ff8 inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="af802304b20568b48ea9da0f203128ff8"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#af802304b20568b48ea9da0f203128ff8">field_idx_</a></td></tr>
<tr class="memdesc:af802304b20568b48ea9da0f203128ff8 inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">The index of the field holding the data that represents the color. <br /></td></tr>
<tr class="separator:af802304b20568b48ea9da0f203128ff8 inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba3fc6b22d44f778e126f94550b7f932 inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memItemLeft" align="right" valign="top"><a id="aba3fc6b22d44f778e126f94550b7f932"></a>
std::vector&lt; <a class="el" href="structpcl_1_1_p_c_l_point_field.html">pcl::PCLPointField</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#aba3fc6b22d44f778e126f94550b7f932">fields_</a></td></tr>
<tr class="memdesc:aba3fc6b22d44f778e126f94550b7f932 inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="mdescLeft">&#160;</td><td class="mdescRight">The list of fields available for this <a class="el" href="classpcl_1_1_point_cloud.html" title="PointCloud represents the base class in PCL for storing collections of 3D points.">PointCloud</a>. <br /></td></tr>
<tr class="separator:aba3fc6b22d44f778e126f94550b7f932 inherit pro_attribs_classpcl_1_1visualization_1_1_point_cloud_color_handler"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private 类型</h2></td></tr>
<tr class="memitem:a6baa5afb791f95ef4dc2141f93a95e6d"><td class="memItemLeft" align="right" valign="top"><a id="a6baa5afb791f95ef4dc2141f93a95e6d"></a>
typedef <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html">PointCloudColorHandler</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::<a class="el" href="classpcl_1_1_point_cloud.html">PointCloud</a>&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloud</b></td></tr>
<tr class="separator:a6baa5afb791f95ef4dc2141f93a95e6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39c4ec8f650f34935e5a6e2cad6cb648"><td class="memItemLeft" align="right" valign="top"><a id="a39c4ec8f650f34935e5a6e2cad6cb648"></a>
typedef PointCloud::Ptr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudPtr</b></td></tr>
<tr class="separator:a39c4ec8f650f34935e5a6e2cad6cb648"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5290fd30f3d41fcc1b5ba6c74198e67"><td class="memItemLeft" align="right" valign="top"><a id="af5290fd30f3d41fcc1b5ba6c74198e67"></a>
typedef PointCloud::ConstPtr&#160;</td><td class="memItemRight" valign="bottom"><b>PointCloudConstPtr</b></td></tr>
<tr class="separator:af5290fd30f3d41fcc1b5ba6c74198e67"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><h3>template&lt;typename PointT&gt;<br />
class pcl::visualization::PointCloudColorHandlerHSVField&lt; PointT &gt;</h3>

<p>HSV handler class for colors. Uses the data present in the "h", "s", "v" fields as the color at each point. </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="a6ff3f3e72f3a6d35c1a77a55946b823b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ff3f3e72f3a6d35c1a77a55946b823b">&#9670;&nbsp;</a></span>getColor()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html">pcl::visualization::PointCloudColorHandlerHSVField</a>&lt; <a class="el" href="structpcl_1_1_point_x_y_z_r_g_b_a.html">PointT</a> &gt;::getColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classvtk_smart_pointer.html">vtkSmartPointer</a>&lt; vtkDataArray &gt; &amp;&#160;</td>
          <td class="paramname"><em>scalars</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Obtain the actual color for the input dataset as vtk scalars. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">scalars</td><td>the output scalars containing the color for the dataset </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>true if the operation was successful (the handler is capable and the input cloud was given as a valid pointer), false otherwise </dd></dl>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000039">待办事项:</a></b></dt><dd>do this with the point_types_conversion in common, first template it! </dd></dl>

<p>实现了 <a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a788257a9e86e041c78a8f8e3250eec7a">pcl::visualization::PointCloudColorHandler&lt; PointT &gt;</a>.</p>
<div class="fragment"><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;{</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;  <span class="keywordflow">if</span> (!<a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a667ee20514feb3d83ea205d39a2efe5f">capable_</a> || !<a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>)</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <span class="keywordflow">return</span> (<span class="keyword">false</span>);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160; </div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;  <span class="keywordflow">if</span> (!scalars)</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    scalars = <a class="code" href="classvtk_smart_pointer.html">vtkSmartPointer&lt;vtkUnsignedCharArray&gt;::New</a> ();</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;  scalars-&gt;SetNumberOfComponents (3);</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160; </div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;  vtkIdType nr_points = <a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points.size ();</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;  <span class="keyword">reinterpret_cast&lt;</span>vtkUnsignedCharArray*<span class="keyword">&gt;</span>(&amp;(*scalars))-&gt;SetNumberOfTuples (nr_points);</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;  <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* colors = <span class="keyword">reinterpret_cast&lt;</span>vtkUnsignedCharArray*<span class="keyword">&gt;</span>(&amp;(*scalars))-&gt;GetPointer (0);</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160; </div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;  <span class="keywordtype">int</span> idx = 0;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;  <span class="comment">// If XYZ present, check if the points are invalid</span></div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;  <span class="keywordtype">int</span> x_idx = -1;</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160; </div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> d = 0; d &lt; <a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#aba3fc6b22d44f778e126f94550b7f932">fields_</a>.size (); ++d)</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#aba3fc6b22d44f778e126f94550b7f932">fields_</a>[d].name == <span class="stringliteral">&quot;x&quot;</span>)</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;      x_idx = <span class="keyword">static_cast&lt;</span><span class="keywordtype">int</span><span class="keyword">&gt;</span> (d);</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160; </div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;  <span class="keywordflow">if</span> (x_idx != -1)</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;  {</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    <span class="comment">// Color every point</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    <span class="keywordflow">for</span> (vtkIdType cp = 0; cp &lt; nr_points; ++cp)</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;    {</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;      <span class="comment">// Copy the value at the specified field</span></div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;      <span class="keywordflow">if</span> (!pcl_isfinite (<a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].x) ||</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;          !pcl_isfinite (<a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].y) ||</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;          !pcl_isfinite (<a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].z))</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;        <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160; </div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160; </div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;      <span class="keywordtype">float</span> h = <a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].h;</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;      <span class="keywordtype">float</span> v = <a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].v;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;      <span class="keywordtype">float</span> s = <a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].s;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;      <span class="comment">// Fill color data with HSV here:</span></div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;      <span class="comment">// restrict the hue value to [0,360[</span></div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;      h = h &lt; 0.0f ? h - (((int)h)/360 - 1)*360 : h - (((<span class="keywordtype">int</span>)h)/360)*360;</div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160; </div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;      <span class="comment">// restrict s and v to [0,1]</span></div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;      <span class="keywordflow">if</span> (s &gt; 1.0f) s = 1.0f;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;      <span class="keywordflow">if</span> (s &lt; 0.0f) s = 0.0f;</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;      <span class="keywordflow">if</span> (v &gt; 1.0f) v = 1.0f;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;      <span class="keywordflow">if</span> (v &lt; 0.0f) v = 0.0f;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160; </div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;      <span class="keywordflow">if</span> (s == 0.0f)</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;      {</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        colors[idx] = colors[idx+1] = colors[idx+2] = v*255;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;      }</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;      <span class="keywordflow">else</span></div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;      {</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;        <span class="comment">// calculate p, q, t from HSV-values</span></div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        <span class="keywordtype">float</span> a = h / 60;</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        <span class="keywordtype">int</span>   i = floor (a);</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <span class="keywordtype">float</span> f = a - i;</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <span class="keywordtype">float</span> p = v * (1 - s);</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;        <span class="keywordtype">float</span> q = v * (1 - s * f);</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;        <span class="keywordtype">float</span> t = v * (1 - s * (1 - f));</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160; </div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;        <span class="keywordflow">switch</span> (i)</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        {</div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;          <span class="keywordflow">case</span> 0:</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;            colors[idx] = v*255; colors[idx+1] = t*255; colors[idx+2] = p*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;          <span class="keywordflow">case</span> 1:</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;            colors[idx] = q*255; colors[idx+1] = v*255; colors[idx+2] = p*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;          <span class="keywordflow">case</span> 2:</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;            colors[idx] = p*255; colors[idx+1] = v*255; colors[idx+2] = t*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;          <span class="keywordflow">case</span> 3:</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;            colors[idx] = p*255; colors[idx+1] = q*255; colors[idx+2] = v*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;          <span class="keywordflow">case</span> 4:</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;            colors[idx] = t*255; colors[idx+1] = p*255; colors[idx+2] = v*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;          <span class="keywordflow">case</span> 5:</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;            colors[idx] = v*255; colors[idx+1] = p*255; colors[idx+2] = q*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        }</div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;      }</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;      idx +=3;</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    }</div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;  }</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;  <span class="keywordflow">else</span></div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;  {</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;    <span class="comment">// Color every point</span></div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;    <span class="keywordflow">for</span> (vtkIdType cp = 0; cp &lt; nr_points; ++cp)</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    {</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;      <span class="keywordtype">float</span> h = <a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].h;</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;      <span class="keywordtype">float</span> v = <a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].v;</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;      <span class="keywordtype">float</span> s = <a class="code" href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">cloud_</a>-&gt;points[cp].s;</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160; </div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;      <span class="comment">// Fill color data with HSV here:</span></div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;      <span class="comment">// restrict the hue value to [0,360[</span></div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;      h = h &lt; 0.0f ? h - (((int)h)/360 - 1)*360 : h - (((<span class="keywordtype">int</span>)h)/360)*360;</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160; </div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;      <span class="comment">// restrict s and v to [0,1]</span></div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;      <span class="keywordflow">if</span> (s &gt; 1.0f) s = 1.0f;</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;      <span class="keywordflow">if</span> (s &lt; 0.0f) s = 0.0f;</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;      <span class="keywordflow">if</span> (v &gt; 1.0f) v = 1.0f;</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;      <span class="keywordflow">if</span> (v &lt; 0.0f) v = 0.0f;</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160; </div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;      <span class="keywordflow">if</span> (s == 0.0f)</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;      {</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        colors[idx] = colors[idx+1] = colors[idx+2] = v*255;</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;      }</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;      <span class="keywordflow">else</span></div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;      {</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        <span class="comment">// calculate p, q, t from HSV-values</span></div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;        <span class="keywordtype">float</span> a = h / 60;</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;        <span class="keywordtype">int</span>   i = floor (a);</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        <span class="keywordtype">float</span> f = a - i;</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <span class="keywordtype">float</span> p = v * (1 - s);</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;        <span class="keywordtype">float</span> q = v * (1 - s * f);</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="keywordtype">float</span> t = v * (1 - s * (1 - f));</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160; </div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        <span class="keywordflow">switch</span> (i)</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        {</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;          <span class="keywordflow">case</span> 0:</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;            colors[idx] = v*255; colors[idx+1] = t*255; colors[idx+2] = p*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;          <span class="keywordflow">case</span> 1:</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;            colors[idx] = q*255; colors[idx+1] = v*255; colors[idx+2] = p*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;          <span class="keywordflow">case</span> 2:</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;            colors[idx] = p*255; colors[idx+1] = v*255; colors[idx+2] = t*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;          <span class="keywordflow">case</span> 3:</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;            colors[idx] = p*255; colors[idx+1] = q*255; colors[idx+2] = v*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;          <span class="keywordflow">case</span> 4:</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;            colors[idx] = t*255; colors[idx+1] = p*255; colors[idx+2] = v*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;          <span class="keywordflow">case</span> 5:</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;            colors[idx] = v*255; colors[idx+1] = p*255; colors[idx+2] = q*255; <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        }</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;      }</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;      idx +=3;</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    }</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;  }</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;  <span class="keywordflow">return</span> (<span class="keyword">true</span>);</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;}</div>
<div class="ttc" id="aclasspcl_1_1visualization_1_1_point_cloud_color_handler_html_a667ee20514feb3d83ea205d39a2efe5f"><div class="ttname"><a href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a667ee20514feb3d83ea205d39a2efe5f">pcl::visualization::PointCloudColorHandler::capable_</a></div><div class="ttdeci">bool capable_</div><div class="ttdoc">True if this handler is capable of handling the input data, false otherwise.</div><div class="ttdef"><b>Definition:</b> point_cloud_color_handlers.h:123</div></div>
<div class="ttc" id="aclasspcl_1_1visualization_1_1_point_cloud_color_handler_html_a792e2bb434adab01260cc3bfc5fd633f"><div class="ttname"><a href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#a792e2bb434adab01260cc3bfc5fd633f">pcl::visualization::PointCloudColorHandler::cloud_</a></div><div class="ttdeci">PointCloudConstPtr cloud_</div><div class="ttdoc">A pointer to the input dataset.</div><div class="ttdef"><b>Definition:</b> point_cloud_color_handlers.h:118</div></div>
<div class="ttc" id="aclasspcl_1_1visualization_1_1_point_cloud_color_handler_html_aba3fc6b22d44f778e126f94550b7f932"><div class="ttname"><a href="classpcl_1_1visualization_1_1_point_cloud_color_handler.html#aba3fc6b22d44f778e126f94550b7f932">pcl::visualization::PointCloudColorHandler::fields_</a></div><div class="ttdeci">std::vector&lt; pcl::PCLPointField &gt; fields_</div><div class="ttdoc">The list of fields available for this PointCloud.</div><div class="ttdef"><b>Definition:</b> point_cloud_color_handlers.h:129</div></div>
<div class="ttc" id="aclassvtk_smart_pointer_html"><div class="ttname"><a href="classvtk_smart_pointer.html">vtkSmartPointer</a></div><div class="ttdef"><b>Definition:</b> actor_map.h:50</div></div>
</div><!-- fragment -->
</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>visualization/include/pcl/visualization/<a class="el" href="point__cloud__color__handlers_8h_source.html">point_cloud_color_handlers.h</a></li>
<li>visualization/include/pcl/visualization/impl/<a class="el" href="point__cloud__color__handlers_8hpp_source.html">point_cloud_color_handlers.hpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>pcl</b></li><li class="navelem"><b>visualization</b></li><li class="navelem"><a class="el" href="classpcl_1_1visualization_1_1_point_cloud_color_handler_h_s_v_field.html">PointCloudColorHandlerHSVField</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
